package com.ocom.human.service;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ocom.common.dto.GetCustomRolePowerDto;
import com.ocom.common.entity.human.EntityRolePermission;
import com.ocom.common.request.company.companyrole.SetPageByRoleRequest;
import com.ocom.common.request.company.companyrole.SetPermissionDto;

import java.util.List;

public interface RolePermissionService extends IService<EntityRolePermission> {
    List<EntityRolePermission> selectRolePagePermission(Long comId, Integer role, Integer pageId);

    Boolean operationRolePagePermission(JSONObject jsonObject);

    List<EntityRolePermission> getRoleButtonPermission(Integer role, Integer comId, Integer pageId);

    Boolean deleteWebButton(Integer pageId, Integer buttonId);

    Boolean deleteRolePermissionByRole(Integer role);

    Boolean addRolePermission(SetPageByRoleRequest request);

    List<GetCustomRolePowerDto> getCustomRolePower(Integer role, Integer comId);
}
